<?php
namespace spider\Services;

use spider\Spider;

class PluginService
{
    public static function install(Spider $Spider, $plugins, ...$opt)
    {
        if(is_array($plugins))
        {
            foreach ($plugins as $plugin) {
                $plugin::install($Spider);
            }
        }else{
            $plugins::install($Spider,...$opt);
        }
        return $Spider;
    }
}